using System.Linq;
using System.Runtime.InteropServices;

namespace EOSDigital.SDK
{
	public struct PropertyDesc
	{
		public int Form;

		public int Access;

		public int NumElements;

		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
		public int[] PropDesc;

		public static bool operator ==(PropertyDesc x, PropertyDesc y)
		{
			if (x.Form == y.Form && x.Access == y.Access && x.NumElements == y.NumElements)
			{
				return x.PropDesc.SequenceEqual(y.PropDesc);
			}
			return false;
		}

		public static bool operator !=(PropertyDesc x, PropertyDesc y)
		{
			return !(x == y);
		}

		public override bool Equals(object obj)
		{
			if (obj is PropertyDesc)
			{
				return this == (PropertyDesc)obj;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = -2128831035;
			num *= (0x1000193 ^ this.Form.GetHashCode());
			num *= (0x1000193 ^ this.Access.GetHashCode());
			num *= (0x1000193 ^ this.NumElements.GetHashCode());
			return num * (0x1000193 ^ this.PropDesc.GetHashCode());
		}
	}
}
